Function.RegisterNamespace("System.EnvironmentStrategy");
if(!System.EnvironmentStrategy.V8)throw new Error("System.EnvironmentStrategy.V8.Windows: Required dependency 'System.EnvironmentStrategy.V8' was not found. Are you missing a script reference?");

System.EnvironmentStrategy.V8.Windows=function(){
    this.base();

    // IEnvironmentStrategy members
    this.GetNewLine=function(){
        return "\r\n";
    };

    this.GetWorkingDirectory=function(){
        return System.IO.Path.Normalize(String.Trim(os.system("cd")));
    };

    // IStrategySpecification members
    this.IsSatisfiedBy=function(candidate){
        if(this.base.IsSatisfiedBy(candidate)){
            try{
                os.system("ver");
                System.IO.Path.DirectorySeparator="\\";
                return true;
            }catch(e){}
        }
        return false;
    };
};

System.EnvironmentStrategy.V8.Windows.Inherit(System.EnvironmentStrategy.V8,'System.EnvironmentStrategy.V8.Windows');

System.Environment.Strategies.Add(System.EnvironmentStrategy.V8.Windows);